# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/04 08:38:55-06:00 bjorn.helgaas@hp.com # Merge hp.com:/home/helgaas/linux/linux-2.4 # into hp.com:/home/helgaas/linux/ia64-extras # # fs/proc/proc_misc.c # 2004/08/04 08:38:53-06:00 bjorn.helgaas@hp.com +0 -0 # Auto merged # # fs/proc/base.c # 2004/08/04 08:38:53-06:00 bjorn.helgaas@hp.com +0 -0 # Auto merged # # drivers/char/mem.c # 2004/08/04 08:38:53-06:00 bjorn.helgaas@hp.com +0 -0 # Auto merged # # Makefile # 2004/08/04 08:38:52-06:00 bjorn.helgaas@hp.com +0 -0 # Auto merged # # Documentation/Configure.help # 2004/08/04 08:38:52-06:00 bjorn.helgaas@hp.com +0 -0 # Auto merged # # ChangeSet # 2004/08/04 09:02:18-03:00 mikpe@csd.uu.se # [PATCH] drivers/macintosh/nvram.c typo # # File offset fixes in -rc5 introduced a typo (missing semi-colon) # in drivers/macintosh/nvram.c, causing compile failure. # Trivial fix below. # # /Mikael # # drivers/macintosh/nvram.c # 2004/08/04 05:44:01-03:00 mikpe@csd.uu.se +1 -1 # drivers/macintosh/nvram.c typo # # ChangeSet # 2004/08/03 20:00:09-03:00 marcelo@logos.cnet # update-i386-defconfig.patch # TAG: v2.4.27-rc5 # # ChangeSet # 2004/08/03 19:16:23-03:00 marcelo@logos.cnet # Changed EXTRAVERSION to -rc5 # # ChangeSet # 2004/08/03 19:15:49-03:00 marcelo@logos.cnet # Al Viro and others: Fix file offset handling races in several drivers # # arch/i386/defconfig # 2004/08/03 20:25:48-03:00 marcelo@logos.cnet +17 -0 # Import patch update-i386-defconfig.patch # # Makefile # 2004/08/03 19:15:58-03:00 marcelo@logos.cnet +1 -1 # Changed EXTRAVERSION to -rc5 # # net/wanrouter/wanproc.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +5 -4 # Import patch 2.4.27-ppos5.patch # # net/atm/mpoa_proc.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +4 -3 # Import patch 2.4.27-ppos5.patch # # net/atm/br2684.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +4 -2 # Import patch 2.4.27-ppos5.patch # # net/8021q/vlanproc.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +5 -4 # Import patch 2.4.27-ppos5.patch # # mm/shmem.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +6 -2 # Import patch 2.4.27-ppos5.patch # # fs/udf/file.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +7 -3 # Import patch 2.4.27-ppos5.patch # # fs/proc/proc_misc.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +4 -3 # Import patch 2.4.27-ppos5.patch # # fs/proc/kcore.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +2 -1 # Import patch 2.4.27-ppos5.patch # # fs/proc/generic.c # 2004/07/30 10:31:20-03:00 marcelo@logos.cnet +9 -5 # Import patch 2.4.27-ppos5.patch # # fs/proc/base.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +6 -5 # Import patch 2.4.27-ppos5.patch # # fs/openpromfs/inode.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +35 -28 # Import patch 2.4.27-ppos5.patch # # fs/hfs/file_hdr.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +3 -3 # Import patch 2.4.27-ppos5.patch # # fs/hfs/file_cap.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +7 -6 # Import patch 2.4.27-ppos5.patch # # fs/hfs/file.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +5 -5 # Import patch 2.4.27-ppos5.patch # # fs/devfs/base.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +9 -8 # Import patch 2.4.27-ppos5.patch # # drivers/zorro/proc.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +3 -5 # Import patch 2.4.27-ppos5.patch # # drivers/video/fbmem.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +12 -10 # Import patch 2.4.27-ppos5.patch # # drivers/usb/host/uhci-debug.h # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +5 -7 # Import patch 2.4.27-ppos5.patch # # drivers/usb/drivers.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +4 -4 # Import patch 2.4.27-ppos5.patch # # drivers/usb/devio.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +9 -8 # Import patch 2.4.27-ppos5.patch # # drivers/usb/brlvger.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +3 -0 # Import patch 2.4.27-ppos5.patch # # drivers/scsi/st.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +9 -4 # Import patch 2.4.27-ppos5.patch # # drivers/scsi/osst.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +9 -4 # Import patch 2.4.27-ppos5.patch # # drivers/sbus/char/flash.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +8 -2 # Import patch 2.4.27-ppos5.patch # # drivers/s390/s390io.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +21 -16 # Import patch 2.4.27-ppos5.patch # # drivers/s390/net/qeth.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +9 -7 # Import patch 2.4.27-ppos5.patch # # drivers/s390/net/netiucv.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +19 -12 # Import patch 2.4.27-ppos5.patch # # drivers/s390/net/ctcmain.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +17 -12 # Import patch 2.4.27-ppos5.patch # # drivers/s390/char/tapechar.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +8 -3 # Import patch 2.4.27-ppos5.patch # # drivers/s390/block/dasd.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +6 -4 # Import patch 2.4.27-ppos5.patch # # drivers/pnp/isapnp_proc.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +17 -14 # Import patch 2.4.27-ppos5.patch # # drivers/pci/proc.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +6 -4 # Import patch 2.4.27-ppos5.patch # # drivers/mtd/mtdchar.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +18 -10 # Import patch 2.4.27-ppos5.patch # # drivers/macintosh/nvram.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +8 -6 # Import patch 2.4.27-ppos5.patch # # drivers/macintosh/ans-lcd.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +4 -5 # Import patch 2.4.27-ppos5.patch # # drivers/isdn/isdn_common.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +7 -3 # Import patch 2.4.27-ppos5.patch # # drivers/isdn/hysdn/hysdn_proclog.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +2 -1 # Import patch 2.4.27-ppos5.patch # # drivers/isdn/hysdn/hysdn_procconf.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +14 -16 # Import patch 2.4.27-ppos5.patch # # drivers/isdn/divert/divert_procfs.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +2 -1 # Import patch 2.4.27-ppos5.patch # # drivers/ieee1394/pcilynx.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +25 -16 # Import patch 2.4.27-ppos5.patch # # drivers/hotplug/pci_hotplug_core.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +26 -21 # Import patch 2.4.27-ppos5.patch # # drivers/gsc/eisa_eeprom.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +11 -5 # Import patch 2.4.27-ppos5.patch # # drivers/char/vc_screen.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +34 -20 # Import patch 2.4.27-ppos5.patch # # drivers/char/tpqic02.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +3 -1 # Import patch 2.4.27-ppos5.patch # # drivers/char/raw.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +5 -4 # Import patch 2.4.27-ppos5.patch # # drivers/char/nwflash.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +8 -6 # Import patch 2.4.27-ppos5.patch # # drivers/char/nvram.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +10 -2 # Import patch 2.4.27-ppos5.patch # # drivers/char/mem.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +2 -2 # Import patch 2.4.27-ppos5.patch # # drivers/char/istallion.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +14 -10 # Import patch 2.4.27-ppos5.patch # # drivers/char/i8k.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +5 -4 # Import patch 2.4.27-ppos5.patch # # drivers/block/rd.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +9 -4 # Import patch 2.4.27-ppos5.patch # # drivers/block/acsi_slm.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +7 -6 # Import patch 2.4.27-ppos5.patch # # arch/x86_64/kernel/mtrr.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +8 -5 # Import patch 2.4.27-ppos5.patch # # arch/s390x/kernel/debug.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +3 -3 # Import patch 2.4.27-ppos5.patch # # arch/s390/kernel/debug.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +4 -4 # Import patch 2.4.27-ppos5.patch # # arch/ppc64/kernel/rtas-proc.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +36 -30 # Import patch 2.4.27-ppos5.patch # # arch/ppc64/kernel/proc_pmc.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +7 -10 # Import patch 2.4.27-ppos5.patch # # arch/ppc64/kernel/nvram.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +9 -5 # Import patch 2.4.27-ppos5.patch # # arch/ppc64/kernel/lparcfg.c # 2004/07/30 10:29:39-03:00 marcelo@logos.cnet +1 -1 # Import patch 2.4.27-ppos5.patch # # arch/ppc/platforms/Makefile # 2004/07/30 10:29:18-03:00 marcelo@logos.cnet +0 -1 # Import patch 2.4.27-ppos5.patch # # arch/ppc/kernel/ppc_htab.c # 2004/07/30 10:29:18-03:00 marcelo@logos.cnet +6 -5 # Import patch 2.4.27-ppos5.patch # # arch/ppc/config.in # 2004/07/30 10:29:18-03:00 marcelo@logos.cnet +0 -1 # Import patch 2.4.27-ppos5.patch # # arch/mips/sibyte/sb1250/bcm1250_tbprof.c # 2004/07/30 10:29:18-03:00 marcelo@logos.cnet +3 -0 # Import patch 2.4.27-ppos5.patch # # arch/ia64/kernel/salinfo.c # 2004/07/30 10:29:18-03:00 marcelo@logos.cnet +5 -4 # Import patch 2.4.27-ppos5.patch # # arch/ia64/kernel/efivars.c # 2004/07/30 10:29:18-03:00 marcelo@logos.cnet +5 -4 # Import patch 2.4.27-ppos5.patch # # arch/i386/kernel/mtrr.c # 2004/07/30 10:29:18-03:00 marcelo@logos.cnet +11 -5 # Import patch 2.4.27-ppos5.patch # # arch/cris/drivers/eeprom.c # 2004/07/30 10:29:18-03:00 marcelo@logos.cnet +6 -6 # Import patch 2.4.27-ppos5.patch # # BitKeeper/deleted/.del-proc_rtas.c~ca8a566ec73bac30 # 2004/08/03 19:14:57-03:00 marcelo@logos.cnet +0 -0 # Delete: arch/ppc/platforms/proc_rtas.c # # BitKeeper/deleted/.del-error_log.h~76c5c9436b7dffbc # 2004/08/03 19:14:57-03:00 marcelo@logos.cnet +0 -0 # Delete: arch/ppc/platforms/error_log.h # # BitKeeper/deleted/.del-error_log.c~5cdf26cd9a8325fd # 2004/08/03 19:14:57-03:00 marcelo@logos.cnet +0 -0 # Delete: arch/ppc/platforms/error_log.c # # ChangeSet # 2004/08/03 14:11:59-07:00 shemminger@osdl.org # [PKT_SCHED]: netem limit not returned correctly. # # Minor leftover from earlier code. Netem scheduler is not reporting # correct limit (ie for 'tc qdisc ls') because it is returning devices limit # not it's own. # # Should apply to 2.4 as well (with fuzz) # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/sched/sch_netem.c # 2004/08/03 14:11:55-07:00 shemminger@osdl.org +1 -1 # [PKT_SCHED]: netem limit not returned correctly. # # Minor leftover from earlier code. Netem scheduler is not reporting # correct limit (ie for 'tc qdisc ls') because it is returning devices limit # not it's own. # # Should apply to 2.4 as well (with fuzz) # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/02 18:46:38-07:00 shemminger@osdl.org # [TCP]: Bic tcp congestion calculation timestamp # # Small change to bictcp based on the BIC 1.1 patches for web100. # Keep track of last time congestion was computed, and recompute # if cwnd changes or every 1/32 of a second. # # Also changes the initialization location for the parameters. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/ipv4/tcp_minisocks.c # 2004/08/02 18:46:17-07:00 shemminger@osdl.org +0 -3 # [TCP]: Bic tcp congestion calculation timestamp # # Small change to bictcp based on the BIC 1.1 patches for web100. # Keep track of last time congestion was computed, and recompute # if cwnd changes or every 1/32 of a second. # # Also changes the initialization location for the parameters. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/ipv4/tcp_input.c # 2004/08/02 18:46:17-07:00 shemminger@osdl.org +18 -3 # [TCP]: Bic tcp congestion calculation timestamp # # Small change to bictcp based on the BIC 1.1 patches for web100. # Keep track of last time congestion was computed, and recompute # if cwnd changes or every 1/32 of a second. # # Also changes the initialization location for the parameters. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # include/net/sock.h # 2004/08/02 18:46:17-07:00 shemminger@osdl.org +1 -0 # [TCP]: Bic tcp congestion calculation timestamp # # Small change to bictcp based on the BIC 1.1 patches for web100. # Keep track of last time congestion was computed, and recompute # if cwnd changes or every 1/32 of a second. # # Also changes the initialization location for the parameters. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/01 19:29:48-07:00 laforge@netfilter.org # [NETFILTER]: Fix broken debug assertion # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_MASQUERADE.c # 2004/08/01 19:29:44-07:00 laforge@netfilter.org +2 -2 # [NETFILTER]: Fix broken debug assertion # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_nat_rule.c # 2004/08/01 19:29:44-07:00 laforge@netfilter.org +2 -1 # [NETFILTER]: Fix broken debug assertion # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/01 19:28:41-07:00 laforge@netfilter.org # [NETFILTER]: ipt_ULOG fix for packet delay # # The ULOG target used to delay the last packet until another one was received. # This patch fixes the issue. # # Signed-off-by: Ruby Joker # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_ULOG.c # 2004/08/01 19:28:37-07:00 laforge@netfilter.org +9 -9 # [NETFILTER]: ipt_ULOG fix for packet delay # # The ULOG target used to delay the last packet until another one was received. # This patch fixes the issue. # # Signed-off-by: Ruby Joker # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/01 19:09:08-07:00 bunk@fs.tum.de # [NET]: Update CONFIG_NET_SCH_NETEM Configure.help entry. # # Documentation/Configure.help # 2004/08/01 19:09:03-07:00 bunk@fs.tum.de +8 -6 # [NET]: Update CONFIG_NET_SCH_NETEM Configure.help entry. # diff -Nru a/Documentation/Configure.help b/Documentation/Configure.help --- a/Documentation/Configure.help 2004-08-04 09:24:38 -07:00 +++ b/Documentation/Configure.help 2004-08-04 09:24:38 -07:00 @@ -18773,6 +18773,11 @@ purpose port, say Y here. See . +Support for serial ports defined in ACPI namespace +CONFIG_SERIAL_ACPI + If you wish to enable serial port discovery via the ACPI + namespace, say Y here. If unsure, say N. + Support for PowerMac serial ports CONFIG_MAC_SERIAL If you have Macintosh style serial ports (8 pin mini-DIN), say Y diff -Nru a/Makefile b/Makefile --- a/Makefile 2004-08-04 09:24:38 -07:00 +++ b/Makefile 2004-08-04 09:24:38 -07:00 @@ -93,6 +93,7 @@ CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \ -fno-strict-aliasing -fno-common +CFLAGS += -g ifndef CONFIG_FRAME_POINTER CFLAGS += -fomit-frame-pointer endif @@ -307,8 +308,7 @@ $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in xconfig: symlinks - $(MAKE) -C scripts kconfig.tk - wish -f scripts/kconfig.tk + @echo -e "***\n* Sorry, xconfig is broken; use \"make menuconfig\" instead.\n***" menuconfig: include/linux/version.h symlinks $(MAKE) -C scripts/lxdialog all diff -Nru a/drivers/char/mem.c b/drivers/char/mem.c --- a/drivers/char/mem.c 2004-08-04 09:24:38 -07:00 +++ b/drivers/char/mem.c 2004-08-04 09:24:38 -07:00 @@ -27,6 +27,10 @@ #include #include +#ifdef CONFIG_IA64 +# include +#endif + #ifdef CONFIG_I2C extern int i2c_init_all(void); #endif @@ -42,7 +46,46 @@ #if defined(CONFIG_S390_TAPE) && defined(CONFIG_S390_TAPE_CHAR) extern void tapechar_init(void); #endif - + +/* + * Architectures vary in how they handle caching for addresses + * outside of main memory. + * + */ +static inline int uncached_access(struct file *file, unsigned long addr) +{ +#if defined(__i386__) + /* + * On the PPro and successors, the MTRRs are used to set + * memory types for physical addresses outside main memory, + * so blindly setting PCD or PWT on those pages is wrong. + * For Pentiums and earlier, the surround logic should disable + * caching for the high addresses through the KEN pin, but + * we maintain the tradition of paranoia in this code. + */ + if (file->f_flags & O_SYNC) + return 1; + return !( test_bit(X86_FEATURE_MTRR, boot_cpu_data.x86_capability) || + test_bit(X86_FEATURE_K6_MTRR, boot_cpu_data.x86_capability) || + test_bit(X86_FEATURE_CYRIX_ARR, boot_cpu_data.x86_capability) || + test_bit(X86_FEATURE_CENTAUR_MCR, boot_cpu_data.x86_capability) ) + && addr >= __pa(high_memory); +#elif defined(CONFIG_IA64) + /* + * On ia64, we ignore O_SYNC because we cannot tolerate memory attribute aliases. + */ + return !(efi_mem_attributes(addr) & EFI_MEMORY_WB); +#else + /* + * Accessing memory above the top the kernel knows about or through a file pointer + * that was marked O_SYNC will be done non-cached. + */ + if (file->f_flags & O_SYNC) + return 1; + return addr >= __pa(high_memory); +#endif +} + static ssize_t do_write_mem(struct file * file, void *p, unsigned long realp, const char * buf, size_t count, loff_t *ppos) { @@ -79,7 +122,7 @@ unsigned long p = *ppos; unsigned long end_mem; ssize_t read; - + end_mem = __pa(high_memory); if (p >= end_mem) return 0; @@ -123,77 +166,16 @@ return do_write_mem(file, __va(p), p, buf, count, ppos); } -#ifndef pgprot_noncached - -/* - * This should probably be per-architecture in - */ -static inline pgprot_t pgprot_noncached(pgprot_t _prot) -{ - unsigned long prot = pgprot_val(_prot); - -#if defined(__i386__) || defined(__x86_64__) - /* On PPro and successors, PCD alone doesn't always mean - uncached because of interactions with the MTRRs. PCD | PWT - means definitely uncached. */ - if (boot_cpu_data.x86 > 3) - prot |= _PAGE_PCD | _PAGE_PWT; -#elif defined(__powerpc__) - prot |= _PAGE_NO_CACHE | _PAGE_GUARDED; -#elif defined(__mc68000__) -#ifdef SUN3_PAGE_NOCACHE - if (MMU_IS_SUN3) - prot |= SUN3_PAGE_NOCACHE; - else -#endif - if (MMU_IS_851 || MMU_IS_030) - prot |= _PAGE_NOCACHE030; - /* Use no-cache mode, serialized */ - else if (MMU_IS_040 || MMU_IS_060) - prot = (prot & _CACHEMASK040) | _PAGE_NOCACHE_S; -#endif - - return __pgprot(prot); -} - -#endif /* !pgprot_noncached */ - -/* - * Architectures vary in how they handle caching for addresses - * outside of main memory. - */ -static inline int noncached_address(unsigned long addr) -{ -#if defined(__i386__) - /* - * On the PPro and successors, the MTRRs are used to set - * memory types for physical addresses outside main memory, - * so blindly setting PCD or PWT on those pages is wrong. - * For Pentiums and earlier, the surround logic should disable - * caching for the high addresses through the KEN pin, but - * we maintain the tradition of paranoia in this code. - */ - return !( test_bit(X86_FEATURE_MTRR, &boot_cpu_data.x86_capability) || - test_bit(X86_FEATURE_K6_MTRR, &boot_cpu_data.x86_capability) || - test_bit(X86_FEATURE_CYRIX_ARR, &boot_cpu_data.x86_capability) || - test_bit(X86_FEATURE_CENTAUR_MCR, &boot_cpu_data.x86_capability) ) - && addr >= __pa(high_memory); -#else - return addr >= __pa(high_memory); -#endif -} - static int mmap_mem(struct file * file, struct vm_area_struct * vma) { unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; + int uncached; - /* - * Accessing memory above the top the kernel knows about or - * through a file pointer that was marked O_SYNC will be - * done non-cached. - */ - if (noncached_address(offset) || (file->f_flags & O_SYNC)) + uncached = uncached_access(file, offset); +#ifdef pgprot_noncached + if (uncached) vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); +#endif /* Don't try to swap out physical pages.. */ vma->vm_flags |= VM_RESERVED; @@ -201,7 +183,7 @@ /* * Don't dump addresses that are not real memory to a core file. */ - if (offset >= __pa(high_memory) || (file->f_flags & O_SYNC)) + if (uncached) vma->vm_flags |= VM_IO; if (remap_page_range(vma->vm_start, offset, vma->vm_end-vma->vm_start, @@ -512,11 +494,13 @@ ret = file->f_pos; force_successful_syscall_return(); break; + case 1: file->f_pos += offset; ret = file->f_pos; force_successful_syscall_return(); break; + default: ret = -EINVAL; } @@ -581,6 +565,7 @@ { unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; unsigned long size = vma->vm_end - vma->vm_start; + int uncached; /* * If the user is not attempting to mmap a high memory address then @@ -591,13 +576,11 @@ if ((offset + size) < (unsigned long) high_memory) return mmap_mem(file, vma); - /* - * Accessing memory above the top the kernel knows about or - * through a file pointer that was marked O_SYNC will be - * done non-cached. - */ - if (noncached_address(offset) || (file->f_flags & O_SYNC)) + uncached = uncached_access(file, offset); +#ifdef pgprot_noncached + if (uncached) vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); +#endif /* Don't do anything here; "nopage" will fill the holes */ vma->vm_ops = &kmem_vm_ops; @@ -608,7 +591,8 @@ /* * Don't dump addresses that are not real memory to a core file. */ - vma->vm_flags |= VM_IO; + if (uncached) + vma->vm_flags |= VM_IO; return 0; } diff -Nru a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c --- a/fs/proc/proc_misc.c 2004-08-04 09:24:38 -07:00 +++ b/fs/proc/proc_misc.c 2004-08-04 09:24:38 -07:00 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -209,6 +210,8 @@ K(i.freeram-i.freehigh), K(i.totalswap), K(i.freeswap)); + + len += hugetlb_report_meminfo(page + len); return proc_calc_metrics(page, start, off, count, eof, len); #undef B